package cn.itsource.openfeign;

import cn.dev33.satoken.annotation.SaIgnore;
import cn.itsource.fallback.LoginOpenFeignFallbackFactory;
import cn.itsource.pojo.domain.Login;
import cn.itsource.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;

/**
 * @program fccar_tt
 * @Description
 * @Author TT
 * @Date 2024/09/04 17:39
 * @Version 1.0
 */
@FeignClient(value = "it-fccar-service-uaa",fallbackFactory = LoginOpenFeignFallbackFactory.class)
@Component
public interface LoginOpenFeign {
    @PostMapping("/manager/login/create")
    @SaIgnore
    JSONResult create(@RequestBody @Valid Login login);

}
